import request from 'UTIL/request'

/**
 * 日志列表
 * @param params
 */
export function QueryList(params) {
  return request({
    url: 'oaLog/queryList',
    method: 'POST',
    data: params
  })
}

/**
 * 日志创建/编辑
 * @param params
 */
export function AddOrUpdate(params) {
  return request({
    url: 'oaLog/addOrUpdate',
    method: 'POST',
    data: params
  })
}

/**
 * 日志删除
 * @param params
 */
export function DeleteById(params) {
  return request({
    url: 'oaLog/deleteById',
    method: 'POST',
    data: params,
		header: {
			'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
		}
  })
}

/**
 * 日志详情
 * @param params
 */
export function QueryById(params) {
  return request({
    url: 'oaLog/queryById',
    method: 'POST',
    data: params,
		header: {
			'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
		}
  })
}

/**
 * 日志回复数据
 * @param params
 */
export function QueryCommentList(params) {
  return request({
    url: 'comment/queryCommentList',
    method: 'POST',
    data: params,
  })
}

/**
 * 日志标记已读
 * @param params
 */
export function ReadLog(params) {
  return request({
    url: 'oaLog/readLog',
    method: 'POST',
    data: params,
    hideLoading: true
  })
}

/**
 * 日志销售简报-关联业务
 * @param params
 */
export function QueryLogBulletinByType(params) {
  return request({
    url: 'oaLog/queryLogBulletinByType',
    method: 'POST',
    data: params
  })
}

/**
 * 日志销售简报-跟进记录
 * @param params
 */
export function QueryLogRecordCount(params) {
  return request({
    url: 'oaLog/queryLogRecordCount',
    method: 'POST',
    data: params,
		requestType: 'form'
  })
}
/**
 * @description: 获取日志对应的日期数据
 * @author: kate同学
 * @date: 2023/2/14 15:37
 */
export function getCalendarDataAPI(data) {
  return request({
    url: 'oaLog/getCalendarData',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}
/**
 * @description:
 * @author: kate同学
 * @date: 2023/2/14 15:37
 */


/**
 * 日志点赞
 * @param params
 */
export function FavourOrCancel(params) {
  return request({
    url: 'oaLog/favourOrCancel',
    method: 'POST',
    data: params,
		requestType: 'form'
  })
}

/**
 * 数量统计
 */
export function QueryOaBusinessNum(params) {
  return request({
    url: 'oaLog/queryOaBusinessNum',
    method: 'POST',
    data: params,
		hideLoading: true
  })
}